VB Term Courier wwwwx wwwwx wwwwwwwww wwwwwwwwwp wwwwwwwwwp wwwwwwwwwp wwwwwwwwwp Form1 BreakTimer &File mscript &Script ... mbar1 mcexit &Exit settings &Settings comparams &Com Params ... monmode &Monitor Mode break &Break transfers &Transfers capture &Capture to file ... uploadtext &Upload Text ... mtbar &Rec XMODEM Binary ... Rec XMODEM &ASCII ... &Tx XMODEM ... Command1_Click nCid OpenComm Command2_Click CloseComm: Command3_Click configure config mousepointer Form_Click Form_UnloadF Cancel| OpenCom CloseCom Form_Load ConfigComn comparams_Click mcexit_Click form_KeyPress KeyAscii WriteComm Timer1_Timer@ ReadComm term_putc term_init timer1N Enabled Intervalr COMSTAT status GetCommError term_putX subroutine? curxi currentx| currenty0 continueM height fontsize settings_Click scaleheight cursorK width" cursor_Click cursor_KeyPress1 disp_cursor hide_cursor6 Form_Paint Term_Redraw slowdown timerlock TermTextColor vt100- ReceiveLoopp ConfigComm Inited~ RedrawScreen scalemode scalewidth screen file_ClickA SerialWrite; Term$ SerialOpen TPort SerialConfigb TBaud TWord0 TParityP SerialClose TConfigChangede SerialRead rx_Click FlagCapture capture_Click capopen captureopen opencapture transfers_Click capture caption monmode_Clickb FlagMonitor monmode text? break_ClickE SerialBreakX BreakTimer intevalp BreakTimer_Timer uploadtext_Click opener filename endfile UploadFile SerialOutFree checked Form_KeyDown keycode Shiftb KEY_UP KEY_DOWNY KEY_LEFTO KEY_RIGHT< KEY_F1 KEY_F2 KEY_F3 KEY_F4y MODAL FlagScript FALSEI FlagUpload ScriptCycle ScriptLoop+ mscript_Click ScriptStart WriteText[ TightLoop LooseLoop lastln GetTickCountN FirstZero1 mrx_Click% filemode mrxa_Click windowstater MINIMIZED NORMAL mtx_Click fileinfo thefilename thepathname thenewpath filecreate oops2k fname pathspec textbox FlagUploadFile BreakWhy BreakOffs EchoSlow StartKeyTimer EchoDelay GluePathName sPath sName uploadtext FILE TTY.FRMn This is the code to handle the main terminal loop Charles McGuinness [76701,11] TTY.FRM Declarationss GetTickCount returns (in multiples of 55/1000s of a second) how longg since the system was booted. We use this in a few places for timingg (See ReceiveLoop) One of the things we want to do is is not constantly turn the cursorr on and off as we receive text. So, when we first receive no data we note the time in firstzero. So long as we don't get any new data, when the time reaches FirstZero + EchoDelay, we'll turn the cursor on (and flush any lingering data)E Used in timing Cursor ONt How long from firstzero to wait On the tty.frm, you'll notice a timer. This timer does two thingss for us. One is that it times a BREAK signal (which needs to be 200ms long). The other is a timer we start whenever the user types a key. Until the timer goes off, the program will immediately writee all received data to the screen, rather than buffering it up (for efficiency). See the README.WRI for details or ReceiveLoop() Why was Break Timer Activated? . to stop breakA . to slow down flushing Form_Unload CloseCom Close Error" Closed Form_Load Unable to open port" VBTERM Unable to configure port VBTERM ConfigCom Force Screen Update comparams_Click mcexit_Click form_KeyPress ReceiveLoop uploadtext.caption = "&Upload Text ..." Form_Paint capture_Click &Capture to file ... Open Capture Unable to open " &Close Capture monmode_Click break_Click BreakTimer_Timer uploadtext_Click &Upload Text ... Upload Canceled. Upload Text File Cannot open Abort &Upload Text Form_KeyDown mscript_Click mrx_Click Receive XMODEM Binary" Binary mrxa_Click Receive XMODEM ASCII ASCII" mtx_Click Upload XMODEM" StartKeyTimer GluePathName Because dir boxes are inconsistent in whether they have a trailingg \ or not, when you mate a path with a name, you have to check for the trailing \ and optionally add one in...